mod user_data;
mod user_login;

use ::reqwest::blocking::Client;
use std::sync::OnceLock;

use lazy_static::lazy_static;

lazy_static! {
    pub static ref CLIENT: OnceLock<Client> = OnceLock::new();
    pub static ref REQ_URL: String = "https://localhost:8080/v1/graphql".to_string();
}

fn get_client() -> &'static Client {
    CLIENT.get_or_init(|| {
        Client::builder()
            .use_rustls_tls()
            .user_agent("graphql-rust/0.10.0")
            .build()
            .unwrap()
    })
}

pub use user_data::update_data;
pub use user_login::login_or_reg;
